<template>
  <t-checkbox v-model="numChecked"><slot></slot></t-checkbox>
</template>
<script lang="ts" setup>
import { computed } from 'vue';
interface checkProps {
  trueValue: any;
  falseValue: any;
  checked: any;
}
const props = defineProps<checkProps>();
const emit = defineEmits(['update:checked']);
const numChecked = computed({
  get() {
    return props.checked == props.trueValue ? true : false;
  },
  set(value) {
    emit('update:checked', value ? props.trueValue : props.falseValue);
  },
});
</script>
